package guda.house.biz.form;

import guda.house.dal.dataobject.SysVarDO;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


public class SysVarForm {

    @NotNull(message = "不能为空")
    @Size(min=0,max=30,message = "长度在0到30个字符之间")
    private String varType;
    @NotNull(message = "不能为空")
    @Size(min=0,max=30,message = "长度在0到30个字符之间")
    private String varValue;
    @NotNull(message = "不能为空")
    private Integer varStatus;

    @NotNull(message = "不能为空")
    private Long villageId;

    public Long getVillageId() {
        return villageId;
    }

    public void setVillageId(Long villageId) {
        this.villageId = villageId;
    }

    public SysVarDO toDO() {
        SysVarDO sysVarDO = new SysVarDO();
        sysVarDO.setVarStatus(varStatus);
        sysVarDO.setVarType(varType);
        sysVarDO.setVarValue(varValue);
        sysVarDO.setVillageId(villageId);
        return sysVarDO;
    }

    public String getVarType() {
        return varType;
    }

    public void setVarType(String varType) {
        this.varType = varType;
    }

    public String getVarValue() {
        return varValue;
    }

    public void setVarValue(String varValue) {
        this.varValue = varValue;
    }

    public Integer getVarStatus() {
        return varStatus;
    }

    public void setVarStatus(Integer varStatus) {
        this.varStatus = varStatus;
    }
}
